package example.demo.controller;


import example.demo.component.collect.CollectTag;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author xiao_rao
 * @since 2021-07-04
 */
//@RestController
@Controller
@RequestMapping("/api/system/wahaha")
public class WahahaController {

    @ResponseBody
    @RequestMapping(path = "/wahaha")
    public String wahaha() {
        ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();//TomcatEmbeddedWebappClassLoader
        return Thread.currentThread().getName() + "--wahaha" + contextClassLoader.toString();
    }

    @CollectTag
    @RequestMapping(path = "/sss1")
    public String sss() {
        return "redirect:/sss.html";
    }


    @CollectTag
    @RequestMapping(path = "/demo1")
    public String lanyangyang() {
        return "demo";
    }

}
